<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>账号列表</title>
<style type="text/css">
.welcome {
	background-color: #DDFFDD;
	border: 1px solid #009900;
	width: 800px;
	margin: auto;
	top: 15;
	left: 0;
	right: 0;
	left: 0;
}

.welcome li {
	list-style: none;
}
</style>
</head>
<body>
	<h1>
		<center>账号列表</center>
	</h1>
	<s:if test="hasActionMessages()">
		<div class="welcome">
			<s:actionmessage />
		</div>
	</s:if>
	<table align="center">
		<tr align=right>
			<td>当前登录账号：<s:property value="#session.currentUserAccount" />
				&nbsp;&nbsp;&nbsp;&nbsp; <a href="login!logout.action">退出登录</a></td>
		</tr>
		<tr>
			<td>
				<table align="center" style="width: 800px;">
					<tr style="background-color:#778899">
						<td><s:property value="'ID'" />
						</td>
						<td><s:property value="'账号'" />
						</td>
						<td><s:property value="'姓名'" />
						</td>
						<td><s:property value="'密码'" />
						</td>
						<td><s:property value="'电话'" />
						</td>
						<td><s:property value="'创建时间'" />
						</td>
						<td><s:property value="'修改时间'" />
						</td>
						<td><s:property value="'操作'" />
						</td>
					</tr>
					<s:iterator value="accountList" var="account" status="st">
						<tr <s:if test="#st.odd"> style="background-color:#D3D3D3" </s:if>>
							<td><s:property value="#account.id" />
							</td>
							<td><s:property value="#account.userAccount" />
							</td>
							<td><s:property value="#account.userName" />
							</td>
							<td><s:property value="#account.cellphone" />
							</td>
							<td><s:property value="#account.cellphone" />
							</td>
							<td><s:property
									value="%{getText('{0,date,yyyy-MM-dd HH:mm:ss}',{#account.createdDate})}" />
							</td>
							<td><s:property
									value="%{getText('{0,date,yyyy-MM-dd HH:mm:ss}',{#account.lastUpdateDate})}" />
							</td>
							<td><a
								href="account!deleteAccount.action?accountId=${account.id}">删除</a>|
								<a href="account!editAccount.action?accountId=${account.id}">修改</a>
							</td>
						</tr>
					</s:iterator>
				</table>
			</td>
		</tr>
	</table>
</body>
</html>
